package cn.bookcycle.requestroom.pojo;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 开锁时发送的加密数据
 *
 * @author liufenglin
 * @date 2018年3月28日
 */
public class SecureData {
	/** 锁的ID */
	private String openLockId;
	
	/** 对设备发送的命令 */
	private String cmd;
	
	/** 发送命令的时间戳 */
	private long timeStamp;

	private SecureData() {}
	
	public static SecureData getInstance(String openLockId, String cmd) {
		SecureData secureData = new SecureData();
		secureData.openLockId = openLockId;
		secureData.cmd = cmd;
		secureData.timeStamp = new Date().getTime();
		return secureData;
	}
	
	public String getOpenLockId() {
		return openLockId;
	}

	public String getCmd() {
		return cmd;
	}

	public long getTimeStamp() {
		return timeStamp;
	}
	
}
